package com.itlong.cloud.push.message;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.PostConstruct;

/**
 * <desc>
 * webscoket初始化启动类.
 * </desc>
 *
 * @createDate 2018/7/19
 */
@RestController
public class WebsocketInitializationService {

    @Autowired
    WebSocketServer webSocketServer;

    @Autowired
    TokenSocketServer tokenSocketServer;

    /**
     * <desc>
     *      初始化
     * </desc>
     *
     * @author Juguang.S
     * @createDate 2018/07/19
     */
    @PostConstruct
    public void polling() throws Exception {
        webSocketServer.run();
        tokenSocketServer.run();
    }
}